<template>
    <div class="overflow-hidden">
        <embed-runkit v-model="code" @input="saveCode"></embed-runkit>
    </div>
</template>

<script>
import embedRunkit from "./embedRunkit.vue";
export default {
    components: { embedRunkit },
    created() {
        this.code = window.localStorage.getItem("Runkit:code") || "";
    },
    methods: {
        saveCode(code) {
            window.localStorage.setItem("Runkit:code", code);
        },
    },
    data() {
        return {
            code: "",
        };
    },
};
</script>

<style lang="less" scoped></style>
